<%@ page import="org.ikastola.Fee" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'fee.label', default: 'Fee')}" />
		<title><g:message code="default.create.label" args="[entityName]" /></title>
		<g:javascript library="jquery" plugin="jquery"/>
		<r:require module="jquery-ui"/>
	</head>
	<body>
		<a href="#create-fee" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="create-fee" class="content scaffold-create" role="main">
			<h1><g:message code="default.create.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<g:hasErrors bean="${feeInstance}">
			<ul class="errors" role="alert">
				<g:eachError bean="${feeInstance}" var="error">
				<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
				</g:eachError>
			</ul>
			</g:hasErrors>
			<g:form action="save" name="feeForm">
				<fieldset class="form">
					<g:render template="form"/>
					<div class="sep" style="border-bottom: 1px dashed rgb(221, 221, 221); margin: 10px 0px;"></div>
					<br/>
					<label style="margin:0px 1.25em 5px 0px;color:rgb(102, 102, 102);font-weight: bold;display: inline-block;">
						<g:message code="label" default="Contiene detalles :" />
					</label>
					<g:checkBox name="adddetail" id="adddetail"/>
				</fieldset>
				<fieldset>
				<div id="detailfee">
					<div class="fieldcontain" id="updateMe"></div>
					<div class="sep" style="border-bottom: 1px dashed rgb(221, 221, 221); margin: 10px 0px;"></div>
					<br/>
					<div id="formaccordion">
						<label>Detalles</label>
						<div>
						<g:form id="detailForm">
							<g:render template="/feeDetail/form"/>
							<div style="margin: 1em 1.25em 5px 13.5em;">
	        					<g:submitToRemote class="buttons" before="if(!validateDetailForm()) return false;" update="updateMe" url="[action:'addDetail']" after='clearDetailForm()' value="Agregar" />
	        				</div>
						</g:form>
						</div>
					</div>
				</div>
				</fieldset>
				<fieldset class="buttons">
					<g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" onClick="submitFeeForm();"/>
				</fieldset>
			</g:form>
			
		</div>
	</body>
</html>
